namespace UniversalAdminSystem.Domian.FileStorage.ValueObjects;

public record FileName
{
    public string Value { get; }
    private FileName(string value)
    {
        if (string.IsNullOrWhiteSpace(value))
            throw new ArgumentException("文件名不能为空");
        if (value.Length > 200)
            throw new ArgumentException("文件名不能超过200字符");
        Value = value;
    }
    public static FileName Create(string value) => new(value);
    public static implicit operator string(FileName name) => name.Value;
} 